package com.example.spring.service.impl;

import com.example.spring.dao.UserDao;
import com.example.spring.service.UserService;

/**
 * 用户服务实现
 */
public class UserServiceImpl implements UserService {
    private final UserDao userDao;

    public UserServiceImpl(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void registerUser(String username) {
        userDao.saveUser(username);
        // 模拟业务逻辑
        System.out.println("用户注册业务逻辑: " + username);
    }

    @Override
    public void updateUserInfo(String username) {
        userDao.updateUser(username);
        System.out.println("更新用户信息业务逻辑: " + username);
    }
}
